package StudyCode.summary.myfile;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class CreateTemporaryDirectory {
	public static void main(String[] args) {
		String tmpDirectoryPrefix = "nio_";
		try {
			Path tmp_1 = Files.createTempDirectory(null);
			System.out.println("临时目录路径: " + tmp_1.toString());

			Path tmp_2 = Files.createTempDirectory(tmpDirectoryPrefix);
			System.out.println("临时目录路径: " + tmp_2.toString());
		} catch (IOException e) {
			System.err.println(e);
		}

	}
}
